package com.fs.global.config;

import com.mongodb.MongoClient;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class MongoConfig {

    @Value("${custom.mongodb.host}")
    private String host;
    @Value("${custom.mongodb.port}")
    private String port;

    @Bean("mongoClient")
    public MongoClient mongoClient(){
        return new MongoClient(host, Integer.parseInt(port));
    }


}
